using System;
using System.Collections.Generic;
using Hematology.Data.Interface;

namespace Hematology.Data
{
	public partial class FaqItem : IComparable<FaqItem>, ISimpleData
	{
		public static List<FaqItem> GetFaqItems()
		{
			List<FaqItem> lFaqItem = FaqItem.Search(null, null, null, null, false, null, null);
			lFaqItem.Sort();

			return lFaqItem;
		}

		public void Save()
		{
			IsDeleted = false;
			CreateDate = DateTime.Now;
			LastModifiedDate = DateTime.Now;

			Insert();
		}

		public void UpdateInstance()
		{
			LastModifiedDate = DateTime.Now;

			Update();
		}

		public void MarkAsDeleted()
		{
			IsDeleted = true;

			Update();
		}

		public int CompareTo(FaqItem other)
		{
			return Question.CompareTo(other.Question);
		}
	}
}

